<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <link href="/resource/css/bootstrap.css" rel="stylesheet">
    <script type="text/javascript" src="/resource/js/jquery-3.2.1.js"></script>
    <script type="text/javascript" src="/resource/My97DatePicker/WdatePicker.js"></script>
</head>
<body>
   <h4>公司流水账</h4>
   <form method="post" action="list">
       <a href="toadd"><input type="button" value="增加"></a>
       <select name="lx">
           <option value="">-请选择-</option>
           <option value="0">借方</option>
           <option value="1">贷方</option>
           <option value="2">余额</option>
       </select>
       <input type="text" name="minmoney" value="${l.minmoney}">-
       <input type="text" name="maxmoney" value="${l.maxmoney}">
       摘要:<input type="text" name="zhaiyao" value="${l.zhaiyao}">
       <select name="lx2">
           <option value="">-请选择-</option>
           <option value="3">源账号</option>
           <option value="4">源账号名称</option>
           <option value="5">目标账号</option>
           <option value="6">目标账号名称</option>
           <option value="7">科目编号</option>
           <option value="8">科目</option>
       </select>
       <input type="text" name="neirong" value="${l.neirong}">
       财务日期:<input type="date"  name="mintime" value='<fmt:formatDate value="${l.mintime}" pattern="yyyy-MM-dd"></fmt:formatDate>'>-
               <input type="date"  name="maxtime" value='<fmt:formatDate value="${l.maxtime}" pattern="yyyy-MM-dd"></fmt:formatDate>'>

       <input type="submit" value="搜索">
       <br>
       <table class="table">
           <tr>
               <th>编号</th>
               <th>财务日期</th>
               <th>源账号</th>
               <th>源账号名称</th>
               <th>目标账号</th>
               <th>目标账号名称</th>
               <th>科目编号</th>
               <th>科目</th>
               <th>摘要</th>
               <th>借方</th>
               <th>贷方</th>
               <th>余额</th>
           </tr>
           <c:forEach var="e" items="${info.list}">
               <tr>
                   <td>${e.id}</td>
                   <td><fmt:formatDate value="${e.caiwutime}" pattern="yyyy-MM-dd"></fmt:formatDate> </td>
                   <td>${e.yuanzhanghao}</td>
                   <td>${e.yuanname}</td>
                   <td>${e.mvbiaozhanghao}</td>
                   <td>${e.mvbiaoname}</td>
                   <td>${e.kemvbianhao}</td>
                   <td>${e.kemv}</td>
                   <td>${e.zhaiyao}</td>
                   <td>${e.jiefang==0?'':e.jiefang}</td>
                   <td>${e.daifang==0?'':e.daifang}</td>
                   <td>${e.yue==0?'':e.yue}</td>
               </tr>
           </c:forEach>
           <tr>
               <td colspan="12">
                   <input type="hidden" name="pageNum">
                   <jsp:include page="/resource/page/pages.jsp"></jsp:include>
               </td>
           </tr>
       </table>
   </form>
<script>

    function goPage(pageNum){
        $("[name='pageNum']").val(pageNum);
        $("form").submit();
    }
    $("[name='lx']").val('${l.lx}');
    $("[name='lx2']").val('${l.lx2}');
</script>
</body>


</html>